files:= ./bin/agingDeamon.o ./bin/blockingQueue.o ./bin/confFile.o ./bin/diskMemory.o ./bin/main.o ./bin/mainMemory.o ./bin/mmu.o ./bin/pMailBox.o ./bin/prm.o ./bin/process.o ./bin/readers_writers.o ./bin/ui.o

all:clear creat $(files) 
	gcc -Wall -o sim $(files) -lpthread
clear:
	rm -rf ./bin/
creat:
	mkdir bin

./bin/agingDeamon.o:
	gcc  -Wall -c ./src/agingDeamon.c -o ./bin/agingDeamon.o 
./bin/blockingQueue.o:
	gcc  -Wall -c ./src/blockingQueue.c -o ./bin/blockingQueue.o 
./bin/confFile.o:
	gcc  -Wall -c ./src/confFile.c -o ./bin/confFile.o 
./bin/diskMemory.o:
	gcc  -Wall -c ./src/diskMemory.c -o ./bin/diskMemory.o 
./bin/main.o:
	gcc  -Wall -c ./src/main.c -o ./bin/main.o 
./bin/mainMemory.o:
	gcc  -Wall -c ./src/mainMemory.c -o ./bin/mainMemory.o 
./bin/mmu.o:
	gcc  -Wall -c ./src/mmu.c -o ./bin/mmu.o 
./bin/pMailBox.o:
	gcc  -Wall -c ./src/pMailBox.c -o ./bin/pMailBox.o
./bin/prm.o:
	gcc  -Wall -c ./src/prm.c -o ./bin/prm.o
./bin/process.o:
	gcc  -Wall -c ./src/process.c -o ./bin/process.o 
./bin/readers_writers.o: ./src/readers_writers.h
	gcc  -Wall -c ./src/readers_writers.c -o ./bin/readers_writers.o 
./bin/ui.o:
	gcc  -Wall -c ./src/ui.c -o ./bin/ui.o 


